﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using FooFun.Web.Controls;
using FAQFrameworks;

namespace FooFun.Web.Controls
{
    public class LinkChangePwd : DataElementControl
    {
        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);

            Guid currentUserId
                = FAQFrameworks.FAQContext.Current.User.AccountId;

            Guid userId
                = FAQFrameworks.FAQContext.Current.AccountId;

            // 不是当前用户
            if (currentUserId != userId)
            {
                if (!FAQContext.Current.User.IsInRole("系统管理员"))
                {
                    this.Visible = false;
                }
            }
        }
    }
}
